Token.js ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
c 3
b 0
f 0
nc 1
dl 0
loc 13
rs 9.4285
nop 2
1
/**
2
 * Lexer token representation.
3
 */
4
class Token {
5
  /**
6
   * Create a Token.
7
   * @param {String} type
8
   * @param {*} value
9
   */
10
  constructor(type, value) {
11
    /**
12
     * @private
13
     * @type {String}
14
     */
15
    this.type = type;
16
17
    /**
18
     * @private
19
     * @type {*}
20
     */
21
    this.value = value;
22
  }
23
24
  /**
25
   * Return the token type
26
   * @return {String}
27
   */
28
  getType() {
29
    return this.type;
30
  }
31
32
  /**
33
   * Return the token value
34
   * @return {*}
35
   */
36
  getValue() {
37
    return this.value;
38
  }
39
}
40
41
export default Token;
42